﻿@{
    ViewBag.Title = "AddAdmin";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@section scripts
{
    <script type="text/javascript" src="~/Scripts/App/Admin/admin_add.js"></script>
}

<div class="content-header">
    <div class="header-section">
        <h1>
            <i class="gi gi-certificate"></i>Quản Lý Quản Trị Viên
            <br>
            <small>Tạo Tài Khoản Mới</small>
        </h1>
    </div>
</div>

<ul class="breadcrumb breadcrumb-top">
    <li><a href="../Admin/index"><i class="fa fa-home"></i></a></li>
    <li><a href="../Admin/ListAdmin">Quản Trị Viên</a></li>
    <li><a href="../Admin/CreateAdmin">Tạo Mới</a></li>
</ul>

<div class="block block-alt-noborder" id="top-addpub">
    <form class="form-horizontal form-bordered" novalidate="novalidate" id="addAdmin_frm">
        <div class="form-group">
            <label for="val_title" class="col-md-4 control-label">Tên tài khoản<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input type="text" data-bind="value: UserName" placeholder="Tên tài khoản" class="form-control" name="val_username" id="val_username">
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="val_pname" class="col-md-4 control-label">Mật khẩu<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input type="password" data-bind="value: Password" class="form-control" placeholder="Mật khẩu" name="val_password" id="val_password">
                    <span class="input-group-addon"><i class="gi gi-playing_dices"></i></span>
                </div>
                <br />
                <div class="input-group">
                    <input type="password" class="form-control" name="confirmpassword" data-required="1" placeholder="Nhập lại mật khẩu" data-bind="value: ConfirmPassword">
                    <span class="input-group-addon"><i class="gi gi-playing_dices"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="val_icon" class="col-md-4 control-label">Giới tính<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <label class="radio">
                    <input type="radio" name="gender" value="true" data-bind="checked: Gender.ForCheck" />
                    Male
                </label>
                <label class="radio">
                    <input type="radio" name="gender" value="false" data-bind="checked: Gender.ForCheck" />
                    Female
                </label>
            </div>
        </div>

        <div class="form-group">
            <label for="val_title" class="col-md-4 control-label">Họ<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input type="text" data-bind="value: FirstName" placeholder="Nhập Họ" class="form-control" name="val_firstname" id="val_firstname">
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="val_title" class="col-md-4 control-label">Tên<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input type="text" data-bind="value: LastName" placeholder="Nhập Tên" class="form-control" name="val_firstname" id="val_firstname">
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="val_title" class="col-md-4 control-label">Email<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <div class="input-group">
                    <input class="form-control" type="text" name="email" data-required="1" placeholder="Email" data-bind="value: Email">
                    <span class="input-group-addon"><i class="gi gi-nameplate"></i></span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="val_icon" class="col-md-4 control-label">Hình đại diện<span class="text-danger">*</span></label>
            <div class="col-md-6">
                <img id="prethum" height="187" width="300" alt="Preview Thumbail">
                <div class="input-group">
                    <input accept="image/*" type="file" data-bind="fileUpload: { property: 'ImgUrl', url: '/api/AdminManagement/PostAdminWithImg' }" class="form-control" name="val_icon" id="val_icon">
                    <span class="input-group-addon"><i class="gi gi-playing_dices"></i></span>
                </div>
            </div>
        </div>

        <div class="form-actions form-group">
            <div class="col-md-8 col-md-offset-4">
                <button class="btn btn-sm btn-primary" id="btn_submit" type="submit">Tạo</button>
                <a class="btn btn-sm btn-primary" href="~/Admin/ListAdmin">Trở Về</a>
            </div>
        </div>

    </form>
</div>
